#ifndef __RCO_DEF_H__
#define __RCO_DEF_H__

namespace rco {

// Command String Definition
#define RCO_COPY			L"cp"
#define RCO_MOVE			L"mv"
#define RCO_DELETE			L"del"
#define RCO_MKDIR			L"mkdir"
#define RCO_TOUCH			L"touch"
#define RCO_CD				L"cd"
#define RCO_LS				L"ls"
#define RCO_DL				L"dl"
#define RCO_GET				L"get"
#define RCO_PUT				L"put"
#define RCO_SETPATH			L"setpath"
#define RCO_QPROCESS		L"qprocess"
#define RCO_KILL			L"kill"
#define RCO_SETPATH			L"setpath"
#define RCO_THREAD			L"thread"
#define RCO_SHUTDOWN		L"shutdown"
#define RCO_GETPATH			L"getpath"


// Command ID Definition
#define RCO_ID_COPY			1
#define RCO_ID_MOVE			2
#define RCO_ID_DELETE		3
#define RCO_ID_MKDIR		4
#define RCO_ID_TOUCH		5
#define RCO_ID_CD			6
#define RCO_ID_LS			7
#define RCO_ID_DL			8
#define RCO_ID_GET			9
#define RCO_ID_PUT			10
#define RCO_ID_SETPATH		11
#define RCO_ID_QPROCESS		12
#define RCO_ID_KILL			13
#define RCO_ID_THREAD		14
#define RCO_ID_GETPATH		15
#define RCO_ID_REPORT		254
#define RCO_ID_SHUTDOWN		255

// Command Task Status
#define RCO_OK				1
#define RCO_FIN				2
#define RCO_CONTINUE		4
#define RCO_CANCEL			8
#define RCO_WAITING			16
#define RCO_NOTEXIST		32
#define RCO_CONTENT_RETURN	64
#define RCO_ERROR			(1<<7)

// Command Switch Value
#define RCO_CMD_SWITCH(i)	(1 << (i))		

// Command Parser Result
enum CmdParserResult
{
	RCO_CMD_NOTEXIST = 0,
    RCO_CMD_OK,			
    RCO_CMD_PARAM_NOT_ENOUGH,
    RCO_CMD_SWITCH_ERROR,
	RCO_CMD_FILE_EXISTS,
	RCO_CMD_PARAMS_ERROR,
	RCO_CMD_CREATE_DIR_ERROR,
	RCO_CMD_FILE_NOT_EXIST,
};

#define RCO_CHECK_BOOL(b) if (!(b)) goto RCO_EXIT
#define RCO_CHECK(rcp) if ((rcp) != RCO_CMD_OK) goto RCO_EXIT
#define rstr(str) QObject::tr(str)

};

#endif // __RCO_DEF_H__